home *** CD-ROM | disk | FTP | other *** search
/ APDL Eductation Resources / APDL Eductation Resources.iso / programs / graphics / gif2rpc / source / 8bpp / h / internal < prev   
Encoding:
Text File  |  1995-10-08  |  810 b   |  36 lines

  1. /* internal.h
  2.  * AUTHOR:      Cy Booker, cy@cheepnis.demon.co.uk
  3.  * LICENSE:     FreeWare, Copyright (c) 1995 Cy Booker
  4.  * PURPOSE:     common code
  5.  */
  6.  
  7. #ifndef internal_h
  8. #define internal_h
  9.  
  10.  
  11.  
  12. #include "8bpp.h"
  13.  
  14. #include "gif2rpc:map8bpp.h"
  15.  
  16.  
  17.  
  18.  
  19. #define INPUT \
  20.       colour = palette[rove[x]];                        /* source pixel palette entry */\
  21.       red = (colour >> (1*8)) & 0xff; red |= red << 8;  /* scale to internal representation */\
  22.       grn = (colour >> (2*8)) & 0xff; grn |= grn << 8;\
  23.       blu = (colour >> (3*8)) & 0xff; blu |= blu << 8
  24.  
  25.  
  26.  
  27. #define PROCESS \
  28.       rove[x] = (*fn)(&error, red, grn, blu);           /* write pixel */\
  29.       red = error.colour.red;                           /* error */\
  30.       grn = error.colour.grn;\
  31.       blu = error.colour.blu
  32.  
  33.  
  34.  
  35. #endif /* internal_h */
  36.